

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>客户端配置 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="CephFS 客户端能力" href="../client-auth/" />
    <link rel="prev" title="清理队列" href="../purge-queue/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../">Ceph 文件系统</a></li>
      <li class="breadcrumb-item active">客户端配置</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../_sources/cephfs/client-config-ref.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 文件系统</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../#cephfs">CephFS 入门</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id4">管理</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../#id5">挂载 CephFS</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#"> 客户端配置选项</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#id2">更新客户端配置</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id3">客户端配置参考</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../client-auth/"> 客户端认证</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-prerequisites/"> 挂载 CephFS: 前提条件</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-using-kernel-driver/"> 用内核驱动挂载 CephFS 文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-using-fuse/"> 用 FUSE 挂载 CephFS</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-dokan/"> 在 Windows 上挂载 CephFS</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/cephfs-shell/"> CephFS Shell 的用法</a></li>
<li class="toctree-l3"><a class="reference internal" href="../kernel-features/"> 内核驱动支持的功能</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/ceph-fuse/"> ceph-fuse 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/mount.ceph/"> mount.ceph 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/mount.fuse.ceph/"> mount.fuse.ceph 手册页</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../#id6">CephFS 内幕</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id7">故障排除和灾难恢复</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id9">更多细节</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="id1">
<h1>客户端配置<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h1>
<section id="id2">
<h2>更新客户端配置<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h2>
<p>有些客户端配置可以在运行时应用生效。要看一个配置选项能否在运行时生效
（客户端接受并生效），用 <cite>config help</cite> 命令：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">config</span> <span class="n">help</span> <span class="n">debug_client</span>
 <span class="n">debug_client</span> <span class="o">-</span> <span class="n">Debug</span> <span class="n">level</span> <span class="k">for</span> <span class="n">client</span>
 <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="n">advanced</span><span class="p">)</span>                                                                                                                      <span class="n">Default</span><span class="p">:</span> <span class="mi">0</span><span class="o">/</span><span class="mi">5</span>
 <span class="n">Can</span> <span class="n">update</span> <span class="n">at</span> <span class="n">runtime</span><span class="p">:</span> <span class="n">true</span>

 <span class="n">The</span> <span class="n">value</span> <span class="n">takes</span> <span class="n">the</span> <span class="n">form</span> <span class="s1">&#39;N&#39;</span> <span class="ow">or</span> <span class="s1">&#39;N/M&#39;</span> <span class="n">where</span> <span class="n">N</span> <span class="ow">and</span> <span class="n">M</span> <span class="n">are</span> <span class="n">values</span> <span class="n">between</span> <span class="mi">0</span> <span class="ow">and</span> <span class="mf">99.</span>  <span class="n">N</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">debug</span> <span class="n">level</span> <span class="n">to</span> <span class="n">log</span> <span class="p">(</span><span class="nb">all</span> <span class="n">values</span> <span class="n">below</span> <span class="n">this</span> <span class="n">are</span> <span class="n">included</span><span class="p">),</span> <span class="ow">and</span> <span class="n">M</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">level</span> <span class="n">to</span> <span class="n">gather</span> <span class="ow">and</span> <span class="n">buffer</span> <span class="ow">in</span> <span class="n">memory</span><span class="o">.</span>  <span class="n">In</span> <span class="n">the</span> <span class="n">event</span> <span class="n">of</span> <span class="n">a</span> <span class="n">crash</span><span class="p">,</span> <span class="n">the</span> <span class="n">most</span> <span class="n">recent</span> <span class="n">items</span> <span class="o">&lt;=</span> <span class="n">M</span> <span class="n">are</span> <span class="n">dumped</span> <span class="n">to</span> <span class="n">the</span> <span class="n">log</span> <span class="n">file</span><span class="o">.</span>
</pre></div>
</div>
<p><cite>config help</cite> 会告诉你指定的配置能否在运行时生效，
还有它的默认值、这个配置选项的描述。</p>
<p>要在运行时更新一个配置选项，用 <cite>config set</cite> 命令：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">config</span> <span class="nb">set</span> <span class="n">client</span> <span class="n">debug_client</span> <span class="mi">20</span><span class="o">/</span><span class="mi">20</span>
</pre></div>
</div>
<p>注意，这个配置变更会应用于所有客户端。</p>
<p>要检查配置的选项，用 <cite>config get</cite> 命令：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">config</span> <span class="n">get</span> <span class="n">client</span>
 <span class="n">WHO</span>    <span class="n">MASK</span> <span class="n">LEVEL</span>    <span class="n">OPTION</span>                    <span class="n">VALUE</span>     <span class="n">RO</span>
 <span class="n">client</span>      <span class="n">advanced</span> <span class="n">debug_client</span>              <span class="mi">20</span><span class="o">/</span><span class="mi">20</span>
 <span class="k">global</span>      <span class="n">advanced</span> <span class="n">osd_pool_default_min_size</span> <span class="mi">1</span>
 <span class="k">global</span>      <span class="n">advanced</span> <span class="n">osd_pool_default_size</span>     <span class="mi">3</span>
</pre></div>
</div>
</section>
<section id="id3">
<h2>客户端配置参考<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h2>
<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_acl_type">
<span class="sig-name descname"><span class="pre">client_acl_type</span></span><a class="headerlink" href="#confval-client_acl_type" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置 ACL 类型。现在还只能设置为 <code class="docutils literal notranslate"><span class="pre">&quot;posix_acl&quot;</span></code> 表示启用 POSIX ACL ，或者可设置为空字符串。此选项只有在
<code class="docutils literal notranslate"><span class="pre">fuse_default_permissions</span></code> 被设置为 <code class="docutils literal notranslate"><span class="pre">false</span></code> 时有效。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_cache_mid">
<span class="sig-name descname"><span class="pre">client_cache_mid</span></span><a class="headerlink" href="#confval-client_cache_mid" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端缓存中点。此中点把最近用过的列表分割为热列表和暖列表。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0.75</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_cache_size">
<span class="sig-name descname"><span class="pre">client_cache_size</span></span><a class="headerlink" href="#confval-client_cache_size" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端保留在元数据缓存中的 inode 数量。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">16Ki</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_caps_release_delay">
<span class="sig-name descname"><span class="pre">client_caps_release_delay</span></span><a class="headerlink" href="#confval-client_caps_release_delay" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置释放能力的延时，单位为秒。 这个延时控制着客户端不再需要能力时， 再等多少秒就释放， 以便其它需要这些能力的用户空间操作使用。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">5</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_debug_force_sync_read">
<span class="sig-name descname"><span class="pre">client_debug_force_sync_read</span></span><a class="headerlink" href="#confval-client_debug_force_sync_read" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 时，客户端会跳过本地页缓存、 直接从 OSD 读取数据。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_dirsize_rbytes">
<span class="sig-name descname"><span class="pre">client_dirsize_rbytes</span></span><a class="headerlink" href="#confval-client_dirsize_rbytes" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>此选项可以启用一个 CephFS 功能， 就是用 stat 数据结构的 st_size 字段存储递归目录的尺寸
（此目录内的文件及其子孙们占用的空间）。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_max_inline_size">
<span class="sig-name descname"><span class="pre">client_max_inline_size</span></span><a class="headerlink" href="#confval-client_max_inline_size" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>控制内联数据的最大尺寸，小于此尺寸就存储到文件的索引节点内， 超过则存到单独的 RADOS 对象内。 本选项只有设置了 MDS 图的
<code class="docutils literal notranslate"><span class="pre">inline_data</span></code> 标志时有效。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">4Ki</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_metadata">
<span class="sig-name descname"><span class="pre">client_metadata</span></span><a class="headerlink" href="#confval-client_metadata" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>客户端向各 MDS 发送元数据时，除了自动生成的版本号、主机名等信息， 还可以附加逗号分隔的字符串作为附加元数据。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_mount_gid">
<span class="sig-name descname"><span class="pre">client_mount_gid</span></span><a class="headerlink" href="#confval-client_mount_gid" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置 CephFS 挂载后的组 ID 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">-1</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_mount_timeout">
<span class="sig-name descname"><span class="pre">client_mount_timeout</span></span><a class="headerlink" href="#confval-client_mount_timeout" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置挂载 CephFS 时的超时时间，单位为秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">secs</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">5</span> <span class="pre">minutes</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_mount_uid">
<span class="sig-name descname"><span class="pre">client_mount_uid</span></span><a class="headerlink" href="#confval-client_mount_uid" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>Set the user ID of CephFS mount.</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">-1</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_mountpoint">
<span class="sig-name descname"><span class="pre">client_mountpoint</span></span><a class="headerlink" href="#confval-client_mountpoint" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>指定要挂载的 CephFS 文件系统目录。 此选项的作用类似 <code class="docutils literal notranslate"><span class="pre">ceph-fuse</span></code> 命令的 <code class="docutils literal notranslate"><span class="pre">-r</span></code> 选项。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">/</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc">
<span class="sig-name descname"><span class="pre">client_oc</span></span><a class="headerlink" href="#confval-client_oc" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>enable object caching</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc_max_dirty">
<span class="sig-name descname"><span class="pre">client_oc_max_dirty</span></span><a class="headerlink" href="#confval-client_oc_max_dirty" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置对象缓存的脏数据上限，单位为字节。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">100Mi</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc_max_dirty_age">
<span class="sig-name descname"><span class="pre">client_oc_max_dirty_age</span></span><a class="headerlink" href="#confval-client_oc_max_dirty_age" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>用于设置回写之前，脏数据在对象缓存中的最大存留时间， 单位为秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">5.0</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc_max_objects">
<span class="sig-name descname"><span class="pre">client_oc_max_objects</span></span><a class="headerlink" href="#confval-client_oc_max_objects" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置对象缓存允许的最大对象数。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">1000</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc_size">
<span class="sig-name descname"><span class="pre">client_oc_size</span></span><a class="headerlink" href="#confval-client_oc_size" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端可缓存的数据上限，单位为字节。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">200Mi</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_oc_target_dirty">
<span class="sig-name descname"><span class="pre">client_oc_target_dirty</span></span><a class="headerlink" href="#confval-client_oc_target_dirty" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置认定为脏数据的目标尺寸。我们建议这个数字尽量小些。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">8Mi</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_permissions">
<span class="sig-name descname"><span class="pre">client_permissions</span></span><a class="headerlink" href="#confval-client_permissions" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>检查所有 I/O 操作的客户端权限。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_quota_df">
<span class="sig-name descname"><span class="pre">client_quota_df</span></span><a class="headerlink" href="#confval-client_quota_df" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>让 <code class="docutils literal notranslate"><span class="pre">statfs</span></code> 操作报告根目录的配额。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_readahead_max_bytes">
<span class="sig-name descname"><span class="pre">client_readahead_max_bytes</span></span><a class="headerlink" href="#confval-client_readahead_max_bytes" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端预读数据的最大尺寸， 单位为字节。 本选项可被 <code class="docutils literal notranslate"><span class="pre">client_readahead_max_periods</span></code> 覆盖。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0B</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_readahead_max_periods">
<span class="sig-name descname"><span class="pre">client_readahead_max_periods</span></span><a class="headerlink" href="#confval-client_readahead_max_periods" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端预读的文件布局分片最大数量 （对象尺寸 * 条带数量）。 本选项会覆盖
<code class="docutils literal notranslate"><span class="pre">client_readahead_max_bytes</span></code> 选项。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">4</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_readahead_min">
<span class="sig-name descname"><span class="pre">client_readahead_min</span></span><a class="headerlink" href="#confval-client_readahead_min" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置客户端预读的最小尺寸，单位为字节。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">128Ki</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_reconnect_stale">
<span class="sig-name descname"><span class="pre">client_reconnect_stale</span></span><a class="headerlink" href="#confval-client_reconnect_stale" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>是否自动重连过期的会话。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_snapdir">
<span class="sig-name descname"><span class="pre">client_snapdir</span></span><a class="headerlink" href="#confval-client_snapdir" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置快照目录名。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">.snap</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_tick_interval">
<span class="sig-name descname"><span class="pre">client_tick_interval</span></span><a class="headerlink" href="#confval-client_tick_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置更新能力及维持其它信息的间隔时长，单位为秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">secs</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">1</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_use_random_mds">
<span class="sig-name descname"><span class="pre">client_use_random_mds</span></span><a class="headerlink" href="#confval-client_use_random_mds" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>为各个请求随机选取 MDS 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-fuse_default_permissions">
<span class="sig-name descname"><span class="pre">fuse_default_permissions</span></span><a class="headerlink" href="#confval-fuse_default_permissions" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置为 <code class="docutils literal notranslate"><span class="pre">false</span></code> 时， <code class="docutils literal notranslate"><span class="pre">ceph-fuse</span></code> 工具会用自己的权限验证机制， 而非依靠 FUSE 的强制权限。 启用
POSIX ACL 需把此选项设置为 <code class="docutils literal notranslate"><span class="pre">false</span></code> 、 同时设置 <code class="docutils literal notranslate"><span class="pre">client</span> <span class="pre">acl</span> <span class="pre">type=posix_acl</span></code> 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-fuse_max_write">
<span class="sig-name descname"><span class="pre">fuse_max_write</span></span><a class="headerlink" href="#confval-fuse_max_write" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置单次写入操作的最大字节数。 值为 0 表示维持不变，还是用 FUSE 的默认值 128kB 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0B</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-fuse_disable_pagecache">
<span class="sig-name descname"><span class="pre">fuse_disable_pagecache</span></span><a class="headerlink" href="#confval-fuse_disable_pagecache" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, kernel page cache is disabled for <code class="docutils literal notranslate"><span class="pre">ceph-fuse</span></code>
mounts. When multiple clients read/write to a file at the same time,
readers may get stale data from page cache. Due to limitations of
FUSE, <code class="docutils literal notranslate"><span class="pre">ceph-fuse</span></code> can’t disable page cache dynamically.</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<section id="id4">
<h3>开发者选项<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h3>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>以下选项仅供内部测试，只是为了保持文档完整才罗列在这里。</p>
</div>
<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_debug_getattr_caps">
<span class="sig-name descname"><span class="pre">client_debug_getattr_caps</span></span><a class="headerlink" href="#confval-client_debug_getattr_caps" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>检查 MDS 的响应是否有想要的能力。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_debug_inject_tick_delay">
<span class="sig-name descname"><span class="pre">client_debug_inject_tick_delay</span></span><a class="headerlink" href="#confval-client_debug_inject_tick_delay" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>在客户端动作之间人为地加入延时。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">secs</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_inject_fixed_oldest_tid">
<span class="sig-name descname"><span class="pre">client_inject_fixed_oldest_tid</span></span><a class="headerlink" href="#confval-client_inject_fixed_oldest_tid" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_inject_release_failure">
<span class="sig-name descname"><span class="pre">client_inject_release_failure</span></span><a class="headerlink" href="#confval-client_inject_release_failure" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-client_trace">
<span class="sig-name descname"><span class="pre">client_trace</span></span><a class="headerlink" href="#confval-client_trace" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>文件路径，内容是客户端操作的追踪结果</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

</section>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../purge-queue/" class="btn btn-neutral float-left" title="清理队列" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../client-auth/" class="btn btn-neutral float-right" title="CephFS 客户端能力" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>